package com.jlastu.znb.view;


import android.app.ActivityOptions;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.jlastu.znb.R;

public class FaBuActivity extends AppCompatActivity {

    private LinearLayout sendgoodsLayout;
    private LinearLayout caigouLayout;
    private ImageView closeImg;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fabu); // 替换为您的布局文件名，不包括扩展名

        // 初始化视图
        sendgoodsLayout = findViewById(R.id.send_goods);
        caigouLayout = findViewById(R.id.caigou);
        closeImg = findViewById(R.id.close_img);

        // 设置点击事件
        sendgoodsLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(FaBuActivity.this,AddGoodsActivity.class);
                startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(
                        FaBuActivity.this).toBundle());
            }
        });

        caigouLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(FaBuActivity.this,ByGoodsActivity.class);
                startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(
                        FaBuActivity.this).toBundle());

            }
        });

        closeImg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 关闭按钮点击事件
                onBackPressed();
                finish();
            }
        });
    }
}